﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<iss.sg4210.se18.team6s.Models.SearchModel>" %>

<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="TitleContent">
    Search
</asp:Content>
<asp:Content ID="Content2" runat="server" ContentPlaceHolderID="MainContent">
    <h2>
        Search</h2>
    <%using (Ajax.BeginForm("SearchAll", new AjaxOptions() { UpdateTargetId = "SearchResults" }))
      {%>
    <table>
        <tr>
            <td>
                <label for="lblTitle">
                    Title</label>
            </td>
            <td>
                :
            </td>
            <td>
                <input type="text" id="Title" name="Title" />
            </td>
        </tr>
        <tr>
            <td>
                <label for="lblExperience">
                    Experience</label>
            </td>
            <td>
                :
            </td>
            <td>
                <input type="text" id="Experience" name="Experience" />
            </td>
        </tr>
        <tr>
            <td>
                <label for="lblSalary">
                    Salary</label>
            </td>
            <td>
                :
            </td>
            <td>
                <label for="lblSalaryFrom">
                    From</label>&nbsp;&nbsp;
                <input type="text" id="SalaryFrom" name="SalaryFrom" />&nbsp;&nbsp;&nbsp;&nbsp;
                <label for="lblSalaryTo">
                    To</label>&nbsp;&nbsp;
                <input type="text" id="SalaryTo" name="SalaryTo" />
            </td>
        </tr>
        <tr>
            <td>
                <label for="lblCompany">
                    Company</label>
            </td>
            <td>
                :
            </td>
            <td>
                <input type="text" id="Company" name="Company" />
            </td>
        </tr>
        <tr>
            <td>
                <label for="lblSkills">
                    Skills</label>
            </td>
            <td>
                :
            </td>
            <td>
                <input type="text" id="Skills" name="Skills" />
            </td>
        </tr>
        <tr>
            <td>
                <input type="button" name="searchButton1" value="Search" />
            </td>
            <td>
                &nbsp;&nbsp;&nbsp;&nbsp;
            </td>
            <td>
                <input type="submit" name="searchButton" value="Display All" />
            </td>
        </tr>
    </table>
    <div id="SearchResults">
        <%if (Model != null && Model.Result != null && Model.Result.Count() > 0)
          {
              Html.RenderPartial("SearchResults", Model.Result);
          }
        %>
    </div>
    <%} %>
</asp:Content>
